package com.example.base_mvvm.base;

import android.app.Application;
import android.view.Window;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
//AndroidViewModel里传来了一个带有application的方法,为了全局使用  所以新建一个
public abstract class BaseViewModel<Repo extends BaseRepo> extends AndroidViewModel {
    public Application application;
    public Repo repo;
    public BaseViewModel(@NonNull Application application) {
        super(application);
        this.application = application;
        repo = createRepo();
    }

    protected abstract Repo createRepo();
}
